package com.ryl.yomall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ryl.yomall.model.enums.ProcessStatus;
import com.ryl.yomall.model.order.OrderInfo;

import java.util.List;
import java.util.Map;

public interface OrderService extends IService<OrderInfo> {

    /**
     * 保存订单
     * @param orderInfo
     * @return
     */
    Long saveOrderInfo(OrderInfo orderInfo);

    Boolean hasStock(Long skuId ,Integer skuNum);

    void cancelOrder(Long orderId);

    OrderInfo getOrderInfo(Long orderId);

    Map getOrderPageList(Integer page ,Integer limit);

    void updateOrderStatus(Long orderId ,ProcessStatus paid);

    List<OrderInfo> orderSplit(Long orderId ,String wareSkuMap);

    Map initWareOrder(OrderInfo orderInfo);
}
